<?php

use Illuminate\Database\Seeder;
use App\Models\Admin1;
use Faker\Factory;

class Admin1TableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        //

        Admin1::truncate();
        $faker = Factory::create('zh_CN');

        $data = [];
        for ($i=0;$i<10000;$i++){
            $data[] = [
                'name'=>$faker->name,
                'phone'=>$faker->phoneNumber,
                'email'=>$faker->email,
                'role'=>mt_rand(1,5000),
                'is_use'=>mt_rand(1,2),
            ];
        }

        Admin1::insert($data);
    }
}
